<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css">
  <script src="/lib/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"sekla.cn","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"valine","storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="STC15系列单片机入门与简单代码阅读单片机板焊接完成。首先对单片机板进行功能测试。下载案例之后进行硬件测试，将hex文件写入单片机即可测试。首先选择芯片型号IAP15F2K61S2，下载编程按下reset进行写入，即可测试功能。 IAP：in application programming 在应用编程 ISP:    in system programming 在系统编程">
<meta property="og:type" content="article">
<meta property="og:title" content="STC51系列单片机入门与简单代码阅读">
<meta property="og:url" content="http://sekla.cn/2021/07/10/%E5%B5%8C%E5%85%A5%E5%BC%8F%E6%B5%81%E6%B0%B4%E7%81%AF/index.html">
<meta property="og:site_name" content="Sekla&#39;s Blog">
<meta property="og:description" content="STC15系列单片机入门与简单代码阅读单片机板焊接完成。首先对单片机板进行功能测试。下载案例之后进行硬件测试，将hex文件写入单片机即可测试。首先选择芯片型号IAP15F2K61S2，下载编程按下reset进行写入，即可测试功能。 IAP：in application programming 在应用编程 ISP:    in system programming 在系统编程">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/07/09/rOKYHeLuwy2BsbS.png">
<meta property="og:image" content="https://i.loli.net/2021/07/09/LcVvnMq5suJCESd.png">
<meta property="og:image" content="https://i.loli.net/2021/07/09/daNe9iT7LYQoJsH.png">
<meta property="og:image" content="https://i.loli.net/2021/07/10/clZHUnXLAspYvWe.png">
<meta property="og:image" content="https://i.loli.net/2021/07/10/qR8cTGfS5zHAvCM.png">
<meta property="og:image" content="https://i.loli.net/2021/07/10/G5DaL6UytvZFQ7r.png">
<meta property="article:published_time" content="2021-07-10T10:00:00.000Z">
<meta property="article:modified_time" content="2021-10-18T14:52:31.054Z">
<meta property="article:author" content="Sekla">
<meta property="article:tag" content="C">
<meta property="article:tag" content="嵌入式">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/07/09/rOKYHeLuwy2BsbS.png">

<link rel="canonical" href="http://sekla.cn/2021/07/10/%E5%B5%8C%E5%85%A5%E5%BC%8F%E6%B5%81%E6%B0%B4%E7%81%AF/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>STC51系列单片机入门与简单代码阅读 | Sekla's Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

  <script type="text/javascript" src="/js/my_js/clicklove.js"></script>
<!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-math@4.0.0/dist/style.css">
<!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Sekla's Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Keep Learning Keep Doing</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">14</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">23</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">100</span></a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://sekla.cn/2021/07/10/%E5%B5%8C%E5%85%A5%E5%BC%8F%E6%B5%81%E6%B0%B4%E7%81%AF/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Sekla">
      <meta itemprop="description" content="Sekla">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Sekla's Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          STC51系列单片机入门与简单代码阅读
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-07-10 18:00:00" itemprop="dateCreated datePublished" datetime="2021-07-10T18:00:00+08:00">2021-07-10</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-10-18 22:52:31" itemprop="dateModified" datetime="2021-10-18T22:52:31+08:00">2021-10-18</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F/" itemprop="url" rel="index"><span itemprop="name">嵌入式</span></a>
                </span>
                  ，
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F/STC51%E5%8D%95%E7%89%87%E6%9C%BA%E7%B3%BB%E5%88%97/" itemprop="url" rel="index"><span itemprop="name">STC51单片机系列</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span><br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>1.6k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>1 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="STC15系列单片机入门与简单代码阅读"><a href="#STC15系列单片机入门与简单代码阅读" class="headerlink" title="STC15系列单片机入门与简单代码阅读"></a>STC15系列单片机入门与简单代码阅读</h1><p>单片机板焊接完成。首先对单片机板进行功能测试。下载案例之后进行硬件测试，将hex文件写入单片机即可测试。首先选择芯片型号IAP15F2K61S2，下载编程按下reset进行写入，即可测试功能。</p>
<p><strong>IAP：in application programming</strong> 在应用编程</p>
<p><strong>ISP:    in system programming</strong> 在系统编程</p>
<a id="more"></a>

<h2 id="STC15系列架构"><a href="#STC15系列架构" class="headerlink" title="STC15系列架构"></a>STC15系列架构</h2><img src="https://i.loli.net/2021/07/09/rOKYHeLuwy2BsbS.png" alt="STCstruct" style="zoom:80%;" />

<h2 id="STC单片机IO驱动"><a href="#STC单片机IO驱动" class="headerlink" title="STC单片机IO驱动"></a>STC单片机IO驱动</h2><p>准双向输出配置，强推挽输出配置，仅输入高阻配置，开漏输出配置。</p>
<p>IO输出为高的时候，驱动能力很弱，可以允许外部设备将其拉低，这种情况是需要避免的。</p>
<p>但是当引脚的输出为低的时候，驱动能力很强，可以吸收大电流。</p>
<h3 id="准双向口电路"><a href="#准双向口电路" class="headerlink" title="准双向口电路"></a>准双向口电路</h3><p><img src="https://i.loli.net/2021/07/09/LcVvnMq5suJCESd.png" alt="准双向口"></p>
<p>口锁存数据由寄存器而来。</p>
<h3 id="弱上拉"><a href="#弱上拉" class="headerlink" title="弱上拉"></a>弱上拉</h3><p>第一个晶体管为弱上拉晶体管，当口锁存数据为1，且引脚为1时打开，此上拉提供基础电流让准双向口输出为1。</p>
<p>如果一个引脚输出为1,并且由外部设备下拉到最低，弱上拉晶体管关闭而极弱上拉晶体管维持打开状态。为了把这个引脚强拉为低，外部设备必须有足够的灌电流能力使引脚上的电压降到门限电平以下。</p>
<h3 id="极弱上拉"><a href="#极弱上拉" class="headerlink" title="极弱上拉"></a>极弱上拉</h3><p>当I/O口锁存数据置为1时，该晶体管导通。当引脚悬空时，这个极弱的上拉源产生很弱的上拉电流将引脚 上拉到高电平。</p>
<h3 id="强上拉"><a href="#强上拉" class="headerlink" title="强上拉"></a>强上拉</h3><p>当I/O口锁存数据由0变化到1时，这个上拉用于加快准双向口由 逻辑0到逻辑1的转换。当出现这种情况时，强上拉打开约2个时钟以使引脚能够迅速地 上拉到高电平。</p>
<h3 id="强推挽输出"><a href="#强推挽输出" class="headerlink" title="强推挽输出"></a>强推挽输出</h3><p>强推挽输出配置的下拉结构与开漏输出以及准双向口的下拉结构相同。</p>
<p>当IO锁存数据为1时，提供持续强上拉，一般用于需要更大驱动电流的应用场合。</p>
<p><img src="https://i.loli.net/2021/07/09/daNe9iT7LYQoJsH.png" alt="强推挽"></p>
<h3 id="仅输入"><a href="#仅输入" class="headerlink" title="仅输入"></a>仅输入</h3><p>输入口包含两部分，一个施密特触发器输入，一个干扰抑制电路。</p>
<h3 id="开漏输出"><a href="#开漏输出" class="headerlink" title="开漏输出"></a>开漏输出</h3><p>既可以读取外部状态也可以对外输出高电平/低电平。要正确地读取外部状态或者需要对外部输出高电平时，需要外加上拉电阻。</p>
<h2 id="流水灯工程学习"><a href="#流水灯工程学习" class="headerlink" title="流水灯工程学习"></a>流水灯工程学习</h2><h3 id="发光二极管工作原理"><a href="#发光二极管工作原理" class="headerlink" title="发光二极管工作原理"></a>发光二极管工作原理</h3><p>P0口8位输出连接8个发光二极管L0-L7，P2,3经过一个反相器连接到八个发光二极管的共阴极，要发光二极管导通就必须设置P2,3为高电平，再设置P0为低电平。</p>
<img src="https://i.loli.net/2021/07/10/clZHUnXLAspYvWe.png" style="zoom:67%;" />

<img src="https://i.loli.net/2021/07/10/qR8cTGfS5zHAvCM.png" style="zoom: 67%;" />

<h3 id="P0口的设置与工作"><a href="#P0口的设置与工作" class="headerlink" title="P0口的设置与工作"></a>P0口的设置与工作</h3><p>以上四个IO口工作模式由2个控制器的对应位控制，P0M0与P0M1共同控制。</p>
<p><img src="https://i.loli.net/2021/07/10/G5DaL6UytvZFQ7r.png"></p>
<p>发光二极管发光需要将P0的8pin和P2,3都设置为推挽输出。</p>
<h3 id="Keil-C语言源代码分析"><a href="#Keil-C语言源代码分析" class="headerlink" title="Keil C语言源代码分析"></a>Keil C语言源代码分析</h3><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br></pre></td><td class="code"><pre><span class="line">sfr P0M0        =   <span class="number">0x94</span>;   </span><br><span class="line">sfr P0M1        =   <span class="number">0x93</span>;  </span><br><span class="line">sfr P1M0        =   <span class="number">0x92</span>;   </span><br><span class="line">sfr P1M1        =   <span class="number">0x91</span>;   <span class="comment">//寄存器地址定义</span></span><br><span class="line"></span><br><span class="line">sbit led_sel=P2^<span class="number">3</span>;<span class="comment">//根据原理图设置口为P2.3</span></span><br><span class="line"><span class="keyword">unsigned</span> <span class="keyword">char</span> led;<span class="comment">//全局变量，led设置端口	</span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">init</span><span class="params">()</span></span>&#123;</span><br><span class="line">    P0M1=<span class="number">0x00</span>;</span><br><span class="line">    P0M0=<span class="number">0xff</span>;<span class="comment">//推挽输出设置</span></span><br><span class="line">    </span><br><span class="line">   	P2M1=<span class="number">0x00</span>;</span><br><span class="line">   	P2M2=<span class="number">0x08</span>;</span><br><span class="line">    </span><br><span class="line">    led_sel=<span class="number">1</span>;<span class="comment">//反相器后为低电平</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//ISP软件直接设置生成软件延时代码</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">Delay200ms</span><span class="params">()</span>		<span class="comment">//@11.0592MHz</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">	<span class="keyword">unsigned</span> <span class="keyword">char</span> i, j, k;</span><br><span class="line"></span><br><span class="line">	<span class="comment">//_nop_();</span></span><br><span class="line">	<span class="comment">//_nop_();</span></span><br><span class="line">	i = <span class="number">9</span>;</span><br><span class="line">	j = <span class="number">104</span>;</span><br><span class="line">	k = <span class="number">139</span>;</span><br><span class="line">	<span class="keyword">do</span></span><br><span class="line">	&#123;</span><br><span class="line">		<span class="keyword">do</span></span><br><span class="line">		&#123;</span><br><span class="line">			<span class="keyword">while</span> (--k);</span><br><span class="line">		&#125; <span class="keyword">while</span> (--j);</span><br><span class="line">	&#125; <span class="keyword">while</span> (--i);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//主函数</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">main</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">	Init();</span><br><span class="line">	led=<span class="number">0x01</span>;</span><br><span class="line">	<span class="keyword">while</span>(<span class="number">1</span>)<span class="comment">//死循环重复</span></span><br><span class="line">	&#123;</span><br><span class="line">		P0=led;</span><br><span class="line">		Delay200ms(); <span class="comment">//延时200ms	</span></span><br><span class="line">		<span class="keyword">if</span>(led==<span class="number">0x80</span>)<span class="comment">//当LED被电量在边缘</span></span><br><span class="line">			led=<span class="number">0x01</span>;<span class="comment">//重复开始</span></span><br><span class="line">		<span class="keyword">else</span></span><br><span class="line">			led=led&lt;&lt;<span class="number">1</span>;<span class="comment">//左移一位实现LED点亮变化</span></span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
    </div>
    
    
    

      <footer class="post-footer">
          
          <div class="post-tags">
              <a href="/tags/C/" rel="tag"><i class="fa fa-tag"></i> C</a>
              <a href="/tags/%E5%B5%8C%E5%85%A5%E5%BC%8F/" rel="tag"><i class="fa fa-tag"></i> 嵌入式</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/05/30/csapp-buflab/" rel="prev" title="CSAPP-Buflab">
      <i class="fa fa-chevron-left"></i> CSAPP-Buflab
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/07/10/%E5%B5%8C%E5%85%A5%E5%BC%8F%E6%95%B0%E7%A0%81%E7%AE%A1%E6%89%AB%E6%8F%8F/" rel="next" title="STC51单片机八位数码管动态扫描">
      STC51单片机八位数码管动态扫描 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#STC15%E7%B3%BB%E5%88%97%E5%8D%95%E7%89%87%E6%9C%BA%E5%85%A5%E9%97%A8%E4%B8%8E%E7%AE%80%E5%8D%95%E4%BB%A3%E7%A0%81%E9%98%85%E8%AF%BB"><span class="nav-number">1.</span> <span class="nav-text">STC15系列单片机入门与简单代码阅读</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#STC15%E7%B3%BB%E5%88%97%E6%9E%B6%E6%9E%84"><span class="nav-number">1.1.</span> <span class="nav-text">STC15系列架构</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#STC%E5%8D%95%E7%89%87%E6%9C%BAIO%E9%A9%B1%E5%8A%A8"><span class="nav-number">1.2.</span> <span class="nav-text">STC单片机IO驱动</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%87%86%E5%8F%8C%E5%90%91%E5%8F%A3%E7%94%B5%E8%B7%AF"><span class="nav-number">1.2.1.</span> <span class="nav-text">准双向口电路</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%BC%B1%E4%B8%8A%E6%8B%89"><span class="nav-number">1.2.2.</span> <span class="nav-text">弱上拉</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%9E%81%E5%BC%B1%E4%B8%8A%E6%8B%89"><span class="nav-number">1.2.3.</span> <span class="nav-text">极弱上拉</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%BC%BA%E4%B8%8A%E6%8B%89"><span class="nav-number">1.2.4.</span> <span class="nav-text">强上拉</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%BC%BA%E6%8E%A8%E6%8C%BD%E8%BE%93%E5%87%BA"><span class="nav-number">1.2.5.</span> <span class="nav-text">强推挽输出</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BB%85%E8%BE%93%E5%85%A5"><span class="nav-number">1.2.6.</span> <span class="nav-text">仅输入</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%BC%80%E6%BC%8F%E8%BE%93%E5%87%BA"><span class="nav-number">1.2.7.</span> <span class="nav-text">开漏输出</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B5%81%E6%B0%B4%E7%81%AF%E5%B7%A5%E7%A8%8B%E5%AD%A6%E4%B9%A0"><span class="nav-number">1.3.</span> <span class="nav-text">流水灯工程学习</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%8F%91%E5%85%89%E4%BA%8C%E6%9E%81%E7%AE%A1%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86"><span class="nav-number">1.3.1.</span> <span class="nav-text">发光二极管工作原理</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#P0%E5%8F%A3%E7%9A%84%E8%AE%BE%E7%BD%AE%E4%B8%8E%E5%B7%A5%E4%BD%9C"><span class="nav-number">1.3.2.</span> <span class="nav-text">P0口的设置与工作</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Keil-C%E8%AF%AD%E8%A8%80%E6%BA%90%E4%BB%A3%E7%A0%81%E5%88%86%E6%9E%90"><span class="nav-number">1.3.3.</span> <span class="nav-text">Keil C语言源代码分析</span></a></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Sekla"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Sekla</p>
  <div class="site-description" itemprop="description">Sekla</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">100</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">23</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">14</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/ShenTiao" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;ShenTiao" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:584892986@qq.com" title="E-Mail → mailto:584892986@qq.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



      </div>

      <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1416875904&auto=0&height=66"></iframe>
      
    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Sekla</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">288k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">4:22</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script size="300" alpha="0.6" zIndex="-1" src="/lib/canvas-ribbon/canvas-ribbon.js"></script>
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  
      

<script>
  if (typeof MathJax === 'undefined') {
    window.MathJax = {
      loader: {
        source: {
          '[tex]/amsCd': '[tex]/amscd',
          '[tex]/AMScd': '[tex]/amscd'
        }
      },
      tex: {
        inlineMath: {'[+]': [['$', '$']]},
        tags: 'ams'
      },
      options: {
        renderActions: {
          findScript: [10, doc => {
            document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
              const display = !!node.type.match(/; *mode=display/);
              const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
              const text = document.createTextNode('');
              node.parentNode.replaceChild(text, node);
              math.start = {node: text, delim: '', n: 0};
              math.end = {node: text, delim: '', n: 0};
              doc.math.push(math);
            });
          }, '', false],
          insertedScript: [200, () => {
            document.querySelectorAll('mjx-container').forEach(node => {
              let target = node.parentNode;
              if (target.nodeName.toLowerCase() === 'li') {
                target.parentNode.classList.add('has-jax');
              }
            });
          }, '', false]
        }
      }
    };
    (function () {
      var script = document.createElement('script');
      script.src = '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
      script.defer = true;
      document.head.appendChild(script);
    })();
  } else {
    MathJax.startup.document.state(0);
    MathJax.texReset();
    MathJax.typeset();
  }
</script>

    

  

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/shizuku.model.json"},"display":{"position":"left","width":250,"height":500},"mobile":{"show":false},"react":{"opacity":0.9},"log":false});</script></body>
</html>

<script type="text/javascript" src="/js/src/love.js"></script>
